{% include 'java.header.j2' %}

package {{ table.mark.package }}.{{ table.mark.business_name }};

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import {{ table.mark.package }}.{{ table.mark.business_name }}.mapper.{{ table.derived.naming.mapper_name }};

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class {{ table.derived.naming.service_impl_name }} implements {{ table.derived.naming.service_name }} {

    @Autowired
    private {{ table.derived.naming.mapper_name }} {{ table.mark.business_name }}Mapper;

    @Override
    public void insert({{ table.derived.naming.class_name }} entity) {
        {{ table.mark.business_name }}Mapper.insert(entity);
    }

    @Override
    public void deleteById({{ table.derived.java.primary_key_java_type }} id) {
        {{ table.mark.business_name }}Mapper.deleteById(id);
    }

    @Override
    public void deleteByMap(Map<String, Object> columnMap) {
        {{ table.mark.business_name }}Mapper.deleteByMap(columnMap);
    }

    @Override
    public void deleteBatchIds(List<{{ table.derived.java.primary_key_java_type }}> ids) {
        {{ table.mark.business_name }}Mapper.deleteBatchIds(ids);
    }

    @Override
    public void updateById({{ table.derived.naming.class_name }} entity) {
        {{ table.mark.business_name }}Mapper.updateById(entity);
    }

    @Override
    public void update({{ table.derived.naming.class_name }} entity, QueryWrapper<{{ table.derived.naming.class_name }}> updateWrapper) {
        {{ table.mark.business_name }}Mapper.update(entity, updateWrapper);
    }

    @Override
    public {{ table.derived.naming.class_name }} selectById({{ table.derived.java.primary_key_java_type }} id) {
        return {{ table.mark.business_name }}Mapper.selectById(id);
    }

    @Override
    public List<{{ table.derived.naming.class_name }}> selectBatchIds(List<{{ table.derived.java.primary_key_java_type }}> ids) {
        return {{ table.mark.business_name }}Mapper.selectBatchIds(ids);
    }

    @Override
    public List<{{ table.derived.naming.class_name }}> selectByMap(Map<String, Object> columnMap) {
        return {{ table.mark.business_name }}Mapper.selectByMap(columnMap);
    }

    @Override
    public {{ table.derived.naming.class_name }} selectOne(QueryWrapper<{{ table.derived.naming.class_name }}> queryWrapper) {
        return {{ table.mark.business_name }}Mapper.selectOne(queryWrapper);
    }

    @Override
    public Long selectCount(QueryWrapper<{{ table.derived.naming.class_name }}> queryWrapper) {
        return {{ table.mark.business_name }}Mapper.selectCount(queryWrapper);
    }

    @Override
    public List<{{ table.derived.naming.class_name }}> selectList(QueryWrapper<{{ table.derived.naming.class_name }}> queryWrapper) {
        return {{ table.mark.business_name }}Mapper.selectList(queryWrapper);
    }

    @Override
    public List<Map<String, Object>> selectMaps(QueryWrapper<{{ table.derived.naming.class_name }}> queryWrapper) {
        return {{ table.mark.business_name }}Mapper.selectMaps(queryWrapper);
    }

    @Override
    public List<Object> selectObjs(QueryWrapper<{{ table.derived.naming.class_name }}> queryWrapper) {
        return {{ table.mark.business_name }}Mapper.selectObjs(queryWrapper);
    }

    @Override
    public IPage<{{ table.derived.naming.class_name }}> selectPage(Page<{{ table.derived.naming.class_name }}> page, QueryWrapper<{{ table.derived.naming.class_name }}> queryWrapper) {
        return {{ table.mark.business_name }}Mapper.selectPage(page, queryWrapper);
    }

    @Override
    public IPage<Map<String, Object>> selectMapsPage(Page<Map<String, Object>> page, QueryWrapper<{{ table.derived.naming.class_name }}> queryWrapper) {
        return {{ table.mark.business_name }}Mapper.selectMapsPage(page, queryWrapper);
    }
}